package com.shunli.cterminal.feign;

import com.examples.core.res.CommonResult;
import com.examples.core.tool.constant.ServiceNameConstants;
import com.shunli.cterminal.model.dto.MerchantDTO;
import com.shunli.cterminal.model.req.PayReq;
import com.shunli.cterminal.model.res.PreOrderVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @className: AdPayService
 * @description: TODO
 * @author: yp
 * @date: 2024/7/4
 * @version: 1.0
 */
@FeignClient(contextId = "IAdPayService",value = ServiceNameConstants.PAY_SERVICE)
public interface AdPayService {

    /**
     * 统一预支付
     */
    @PostMapping({"/noAuth/pay/v3/common"})
    CommonResult<PreOrderVO> commonPay(@RequestBody PayReq req);

    /**
     * 获取支付域名
     */
    @PostMapping("/noAuth/pay/getPayDomain")
    CommonResult<MerchantDTO> getPayDomain(@RequestParam(value = "mallCode") String mallCode,
                                           @RequestParam(value = "projectCode") String projectCode);
}
